import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '../views/layout/layout.vue'
import Home from '../views/home/home.vue'
import Cartshop from '../views/cartshop/cartshop.vue'
import My from '../views/my/my.vue'

Vue.use(VueRouter)

const routes = [
 {
   path:'/',
   component:Layout,
   children:[
     { path: '', component: Home },
     { path: '/cartshop', component: Cartshop },
     { path: '/my', component: My }
   ]
 },
]

const router = new VueRouter({
  routes
})

export default router
